package com.stellar.auth.api;


import com.stellar.auth.api.dto.UserInfoDTO;
import com.stellar.web.core.bean.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "stellar-meet-auth")
public interface UserFeignClient {

    /**
     * 根据id查询用户信息
     *
     * @param id
     * @return
     */
    @GetMapping("/api-admin/authUser/get/{id}")
    Result<UserInfoDTO> getById(@PathVariable("id") Long id);

    /**
     * 批量查询用户信息
     *
     * @param ids
     * @return
     */
    @PostMapping("/api-admin/authUser/batchQueryByIds")
    Result<List<UserInfoDTO>> batchQueryByIds(@RequestBody List<Long> ids);

    /**
     * 根据学校id查询用户数量
     *
     * @param id
     * @return
     */
    @GetMapping("/api-admin/authUser/countBySchoolId/{id}")
    Result<Long> countBySchoolId(@PathVariable("id") Long id);
}